package com.yjy.state_machine.v3;

public class OrderContext {

    private String orderNo; // 订单号

    private String currentState; // 当前状态

    private StateHandler stateHandler; // 处理器（将当前状态转换成该处理器的状态）

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getCurrentState() {
        return currentState;
    }

    public void setCurrentState(String currentState) {
        this.currentState = currentState;
    }

    public StateHandler getStateHandler() {
        return stateHandler;
    }

    public void setStateHandler(StateHandler stateHandler) {
        this.stateHandler = stateHandler;
    }

    public void handle() {
        stateHandler.handle(this);
    }
}
